"use strict";

const { Service } = require("egg");
const { ExamLog } = require("../entity/myentity");

class examLogService extends Service {
  /**
   * 获取日志
   * @param {ExamLog} examLog
   */
  async get(examLog) {
    const { app } = this;
    try {
      let query = await app.mysql.select("exam_log", {
        where: examLog,
      });
      
      return { suc: true, msg: "查询考试日志成功", data: query };
    } catch (error) {
      ctx.logger.error(err);
      return { suc: false, msg: error };
    }
  }
}

module.exports = examLogService;